package com.example.JavaWebApi.model.entity.systemEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.JavaWebApi.core.reflect.annotation.ChildrenNode;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
*
* @ClassName: Orginfo
* @Description: TODO(这里用一句话描述这个类的作用)
* @author 杨泽
* @date 2022-06-15
*/
@Data
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName("sys_orginfo")
public class Orginfo implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
 
    /**
     * 组织机构ID
     */
    @TableId(value = "ID",type = IdType.AUTO)
   private Integer id;
    
 
    /**
     * 组织机构名称
     */
   @TableField("OrgName")  
   private String orgName;
    
 
    /**
     * 组织机构编码
     */
   @TableField("OrgCode")  
   private String orgCode;
    
 
    /**
     * 上级组织机构编码
     */
   @TableField("ParentOrgID")  
   private Integer parentOrgId;
    
 
    /**
     * 组织机构简称
     */
   @TableField("ShortName")  
   private String shortName;
    
 
    /**
     * 备注
     */
   @TableField("Remark")  
   private String remark;
    
 
    /**
     * 创建人ID
     */
   @TableField("CreateBy")  
   private Integer createBy;

   @ChildrenNode
   @ApiModelProperty(hidden = true)
   @TableField(exist = false)
   private List<Orginfo> children;

   @TableField(exist = false)
   private Boolean hasChildren;
 
 
}